﻿@model Planisoft.Entities.Contrato

<script src="@Url.Content("~/Scripts/jquery.validate.min.js")" type="text/javascript"></script>
<script src="@Url.Content("~/Scripts/jquery.validate.unobtrusive.min.js")" type="text/javascript"></script>	

<script type = "text/javascript">
    $(function () {
        $("#FechInicio").datepicker({
            changeMonth: true,
            changeYear: true,
            dateFormat: "dd-mm-yy",
            yearRange: "2012:2020"
        })
        $("#FechFin").datepicker({
            changeMonth: true,
            changeYear: true,
            dateFormat: "dd-mm-yy",
            yearRange: "2012:2020"
        })
    })
</script>


@using (Html.BeginForm()) {
    @Html.ValidationSummary(true)
    <fieldset>
        <legend>Editar Contrato</legend>

        <div class="editor-label" hidden="true">
            @Html.Label("Tipo Contrato")
        </div>
        <div class="editor-field" hidden="true">
            @Html.EditorFor(model => model.IdContrato)
            @Html.ValidationMessageFor(model => model.IdContrato)
        </div>

        <div class="editor-label" hidden="true">
            @Html.LabelFor(model => model.IdTrabajador)
        </div>
        <div class="editor-field" hidden="true">
            @Html.EditorFor(model => model.IdTrabajador)
            @Html.ValidationMessageFor(model => model.IdTrabajador)
        </div>

        <div class="editor-label">
            @Html.Label("Tipo Contrato")
        </div>
        <div class="editor-field">
            @Html.DropDownList("IdTipoContrato")
            @Html.ValidationMessageFor(model => model.IdTipoContrato)
        </div>

        <div class="editor-label">
            @Html.Label("Situacion Contrato")
        </div>
        <div class="editor-field">
            @Html.DropDownList("IdSituacionContrato")
            @Html.ValidationMessageFor(model => model.IdSituacionContrato)
        </div>

        <div class="editor-label">
            @Html.Label("Area de Trabajao")
        </div>
        <div class="editor-field">
            @Html.DropDownList("IdAreaTrabajo")
            @Html.ValidationMessageFor(model => model.IdAreaTrabajo)
        </div>

        <div class="editor-label">
            @Html.Label("Motivo de Finalizacion de Contrato")
        </div>
        <div class="editor-field">
            @Html.DropDownList("IdFinalizaContrato")
            @Html.ValidationMessageFor(model => model.IdFinalizaContrato)
        </div>

        <div class="editor-label">
            @Html.LabelFor(model => model.FechInicio)
        </div>
        <div class="editor-field">
            @Html.EditorFor(model => model.FechInicio)
            @Html.ValidationMessageFor(model => model.FechInicio)
        </div>

        <div class="editor-label">
            @Html.LabelFor(model => model.FechFin)
        </div>
        <div class="editor-field">
            @Html.EditorFor(model => model.FechFin)
            @Html.ValidationMessageFor(model => model.FechFin)
        </div>

        <div class="editor-label">
            @Html.LabelFor(model => model.Sueldo)
        </div>
        <div class="editor-field">
            @Html.EditorFor(model => model.Sueldo)
            @Html.ValidationMessageFor(model => model.Sueldo)
        </div>

        <p>
            <input type="submit" value="Guardar" />
        </p>
    </fieldset>
}

<div>
    @Html.ActionLink("Back to List", "Index")
</div>
